package com.jd.controller;

import com.common.model.Result;
import com.jd.model.ProductApplyCondition;
import com.jd.model.ProductApplyVO;
import com.jd.service.JDProductApplyService;
import com.mrobuy.type.ApplyState;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *  JD商品申请管理
 */
@RestController
public class JDProductPriceController {

	private static Logger LOG = LoggerFactory.getLogger(JDProductPriceController.class);

	@Autowired
	private JdbcTemplate jdbcTemplate;

	@Autowired
	private JDProductApplyService jdProductApplyService;

	@RequestMapping("/common/productinfos/price")
	public Result<ProductApplyVO> prices(@ModelAttribute ProductApplyCondition condition) {
		condition.setState(ApplyState.STATE_302.code());
		return jdProductApplyService.loadProductApplies(condition);
	}

}
